<!DOCTYPE html>
<html>

<head>
    <meta charset="UTF-8">
</head>

<body>
<div id="app">
    <el-row :gutter="20">
        <el-col :span="6">
            <div class="grid-content bg-purple_one" onclick="showNavi('question-all')" style="cursor: pointer">
                <img class="left_image"
                     src="images/console/1.png"
                     alt="">
                <div class="right_view">
                    <div class="title">题库管理</div>
                    <div class="bottom_text">把具有相同考察对象的试题分成不同题库</div>
                </div>
            </div>
        </el-col>
        <el-col :span="6">
            <div class="grid-content bg-purple_tow" onclick="showNavi('import-list')" style="cursor: pointer">
                <img class="left_image"
                     src="images/console/2.png"
                     alt="">
                <div class="right_view">
                    <div class="title">导入试题</div>
                    <div class="bottom_text">按照模版格式，调整文档后批量导入题库</div>
                </div>
            </div>
        </el-col>
        <el-col :span="6">
            <div class="grid-content bg-purple_three" onclick="showNavi('category-list')" style="cursor: pointer">
                <img class="left_image"
                     src="images/console/3.png"
                     alt="">
                <div class="right_view">
                    <div class="title">题库分类</div>
                    <div class="bottom_text">把题库按不同的考察对象分成不同类别</div>
                </div>
            </div>
        </el-col>
        <el-col :span="6">
            <div class="grid-content bg-purple_four" onclick="showNavi('paper-list')" style="cursor: pointer">
                <img class="left_image"
                     src="images/console/4.png"
                     alt="">
                <div class="right_view">
                    <div class="title">发起考试</div>
                    <div class="bottom_text">选题库后，发给相关人员考试</div>
                </div>
            </div>
        </el-col>
    </el-row>
    <!-- 题库信息 -->
    <el-row>
        <el-col :span="24">
            <div class="grid-content-tk">
                <h4 class="title_h4">题库信息</h4>
                <div class="flex_view">
                    <div class="item_view">
                        <div class="top_text">题库试题总数</div>
                        <div style="color: #808080;"><span style="font-size: 20px;font-weight: 600;color: #000000;">{{questionNum}}</span>题</div>
                    </div>
                    <div class="item_view">
                        <div class="top_text">专业数量</div>
                        <div style="color: #808080;"><span style="font-size: 20px;font-weight: 600;color: #000000;">{{majorNum}}</span>个</div>
                    </div>
                </div>
            </div>
        </el-col>
    </el-row>
    <!-- 组卷信息 -->
    <el-row>
        <el-col :span="24">
            <div class="grid-content-tk">
                <h4 class="title_h4">组卷信息</h4>
                <div class="flex_view">
                    <div class="item_view">
                        <div class="top_text">组卷总数</div>
                        <div style="color: #808080;"><span style="font-size: 20px;font-weight: 600;color: #000000;">{{paperNum}}</span>份</div>
                    </div>
                    <div class="item_view">
                        <div class="top_text">历史组卷数</div>
                        <div style="color: #808080;"><span style="font-size: 20px;font-weight: 600;color: #000000;">{{okPaperNum}}</span>份</div>
                    </div>
                    <div class="item_view">
                        <div class="top_text">今年组卷次数</div>
                        <div style="color: #808080;"><span style="font-size: 20px;font-weight: 600;color: #000000;">{{yearPaperNum}}</span>份</div>
                    </div>
                </div>
            </div>
        </el-col>
    </el-row>
</div>
</body>
<script src="js/vue.min.js"></script>
<script src="js/axios.js"></script>
<link rel="stylesheet" href="css/index.css">
<script src="index.js"></script>
<script>
    function showNavi(url){
        top.showNavi(url);
    }
    function selectLib(obj){
        alert(top.document)
    }


    new Vue({
        el: '#app',
        data: function () {
            return {
                libNum : 0,
                questionNum:0,
                majorNum:0,
                paperNum:0,
                ableQuestionNum:0,
                yearPaperNum:0,
                okPaperNum:0
            }
        },mounted(){
            axios.get("lib/getConsoleData").then(res=>{
                let data = res.data;
                this.libNum = data.libNum;
                this.questionNum = data.questionNum;
                this.majorNum = data.majorNum;
                this.paperNum = data.paperNum;
                this.okPaperNum = data.okPaperNum;
                this.ableQuestionNum = data.ableQuestionNum;
                this.yearPaperNum = data.yearPaperNum;
            })
        }
    })
</script>
<style>
    * {
        margin: 0;
        padding: 0;
    }
    #app {
        width: 100vw;
        height: 100vh;
        background: #f6f8f9;
        padding: 20px;
        box-sizing: border-box;
    }

    .el-row {
        margin-bottom: 20px;

        &:last-child {
            margin-bottom: 0;
        }
    }

    .el-col {
        border-radius: 4px;
    }

    .bg-purple_one {
        background: #576df5;
    }

    .bg-purple_tow {
        background: #428bf7;
    }

    .bg-purple_three {
        background: #56bcbd;
    }

    .bg-purple_four {
        background: #756bf6;
    }

    .grid-content {
        border-radius: 4px;
        height: 70px;
        display: flex;
        align-items: center;
        padding-left: 20px;
        box-sizing: border-box;
    }

    .grid-content-tk {
        height: 150px;
        background: #fff;
        padding-top: 20px;
        box-sizing: border-box;
    }
    .title_h4{
        margin-left: 20px;
    }
    .flex_view{
        display: flex;
        align-items: center;
        justify-content: space-between;
    }
    .item_view{
        width: 25%;
        margin-top: 20px;
        height: 60px;
        /* border: 1px solid #000; */
        text-align: center;
        padding-top: 10px;
        box-sizing: border-box;
    }
    .top_text{
        font-size: 13px;
        color: #808080;
        margin-bottom: 10px;
    }
    .number{

    }
    .row-bg {
        padding: 10px 0;
        background-color: #f9fafc;
    }

    .left_image {
        width: 40px;
        height: 40px;
        border-radius: 8px;
    }

    .right_view {
        margin-left: 10px;
    }

    .title {
        font-size: 14px;
        font-weight: 600;
        color: #fff;
    }

    .bottom_text {
        font-size: 10px;
        color: #fff;
        margin-top: 2px;
    }
</style>
</html>